package com.yc.bbs.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yc.bbs.dao.AdvertisementMapper;
import com.yc.bbs.entity.Advertisement;
import com.yc.bbs.service.IAdvertisementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author csl
 * @since 2024-12-07
 */
@Service
public class AdvertisementServiceImpl extends ServiceImpl<AdvertisementMapper, Advertisement> implements IAdvertisementService {
    @Autowired
    AdvertisementMapper advertisementMapper;
    public int updateUserInfoAdmin(Advertisement advertisement){
        LambdaQueryWrapper<Advertisement> lqw = new LambdaQueryWrapper<>();
        lqw.eq(Advertisement::getId,advertisement.getId());
        int update = advertisementMapper.update(advertisement, lqw);
        return update;
    }
}
